#ifndef _KLAS_TEXT_HPP_
#define _KLAS_TEXT_HPP_

#include "Renderable.hpp"
#include "Font.hpp"
#include "Color.hpp"

#include <string>
using std::string;

namespace klas
{
  namespace graphics
  {
    //! Simplifies text rendering.  Allows text to be rendered via a font.
    class KLAS_API Text: public Renderable
    {
    public:
      //! Ctor.  Takes a font.  The font is used to render the text.
      Text(Font* font);

      //! Ctor.  Takes a string, which will be rendered, and a font, wich will render the text.
      Text(string text, Font* font);

      //! Changes the font object used to render.
      void setFont(Font* font);

      //! Gets the font object being used to render.
      Font* getFont() const;

      //! Changes the text being rendered.
      void setText(string txt);

      //! Gets the text being rendered.
      string getText() const;

      //! Changes the color of the text.
      void setColor(const Color& col);

      //! Returns the color of the text.
      Color getColor() const;

    private:

      //! Renders the text.
      virtual void renderElement(RenderingCore* core, const math::Vector2d& origin);

      string m_text; //!< The text of the font object.
      Font* m_font;  //!< The font object used to render text.
      Color m_color; //!< The color of the font.

    };
  }
}

#endif